package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-12-22
 * Time: 19:07
 */
public class Main {
    public static void main(String[] args) {
        Complex<Integer> c1=new Complex<Integer>(3,4);
        System.out.println(c1);
        Complex<Double> c2=new Complex<Double>(3.2,4.3);
        System.out.println(c2);
        Complex<Float> c3=new Complex<Float>(5.1f,4.2f);
        System.out.println(c3);
    }
}
class Complex<X>{
    private X a;
    private X b;

    public Complex(X a, X b) {
        this.a = a;
        this.b = b;
    }

    @Override
    public String toString() {
        return "("+a+","+b+")";
    }
}
/* 请在这里填写答案 */